<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
    

    

    



    <meta charset="utf-8">
    
    
    
    <title>切片请求工具类 | 奔跑的蜗牛 | 虚心若愚</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="gis,切片">
    <meta name="description" content="javascript module.exports = &amp;#123;    /**     * 根据经纬度和缩放等级，求得瓦片路径     * @param &amp;#123;*&amp;#125; lat 纬度     * @param &amp;#123;*&amp;#125; lon 精度     * @param &amp;#123;*&amp;#125; zoom 缩放级别     */    getTileNumber(lat,">
<meta name="keywords" content="gis,切片">
<meta property="og:type" content="article">
<meta property="og:title" content="切片请求工具类">
<meta property="og:url" content="http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/index.html">
<meta property="og:site_name" content="奔跑的蜗牛">
<meta property="og:description" content="javascript module.exports = &amp;#123;    /**     * 根据经纬度和缩放等级，求得瓦片路径     * @param &amp;#123;*&amp;#125; lat 纬度     * @param &amp;#123;*&amp;#125; lon 精度     * @param &amp;#123;*&amp;#125; zoom 缩放级别     */    getTileNumber(lat,">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2020-03-18T05:13:57.992Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="切片请求工具类">
<meta name="twitter:description" content="javascript module.exports = &amp;#123;    /**     * 根据经纬度和缩放等级，求得瓦片路径     * @param &amp;#123;*&amp;#125; lat 纬度     * @param &amp;#123;*&amp;#125; lon 精度     * @param &amp;#123;*&amp;#125; zoom 缩放级别     */    getTileNumber(lat,">
    
        <link rel="alternative" href="/atom.xml" title="奔跑的蜗牛" type="application/atom+xml">
    
    <link rel="shortcut icon" href="/blog/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@1.5.2/css/style.css">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/blog/img/timg.jpg)">
      <div class="brand">
        <a href="/blog/" class="avatar waves-effect waves-circle waves-light">
          <img src="/blog/img/user2.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">windy</h5>
          <a href="mailto:windynature@163.com" title="windynature@163.com" class="mail">windynature@163.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/blog/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                分类
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/WindyNature" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://git.oschina.net/windynature" target="_blank" >
                <i class="icon icon-lg icon-mayun"></i>
                码云
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">切片请求工具类</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">切片请求工具类</h1>
        <h5 class="subtitle">
            
                <time datetime="2020-03-18T05:13:00.856Z" itemprop="datePublished" class="page-time">
  2020-03-18
</time>


	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/GIS基本原理/">GIS基本原理</a></li></ul>

            
        </h5>
    </div>

    

</header>


<div class="container body-wrap">
    
<article id="post-gis基本原理/瓦片计算工具类"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">切片请求工具类</h1>
        <div class="post-meta">
            <time class="post-time" title="2020年03月18日 13:13" datetime="2020-03-18T05:13:00.856Z"  itemprop="datePublished">2020-03-18</time>

            
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/GIS基本原理/">GIS基本原理</a></li></ul>



            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <p><strong>javascript</strong></p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="built_in">module</span>.exports = &#123;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 根据经纬度和缩放等级，求得瓦片路径</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>lat 纬度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>lon 精度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>zoom 缩放级别</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    getTileNumber(lat, lon, zoom) &#123;</span><br><span class="line">        <span class="keyword">var</span> xtile = <span class="built_in">parseInt</span>(<span class="built_in">Math</span>.floor((lon + <span class="number">180</span>) / <span class="number">360</span> * (<span class="number">1</span> &lt;&lt; zoom)));</span><br><span class="line">        <span class="keyword">var</span> ytile = <span class="built_in">parseInt</span>(<span class="built_in">Math</span>.floor((<span class="number">1</span> - <span class="built_in">Math</span>.log(<span class="built_in">Math</span>.tan(<span class="keyword">this</span>.toRadians(lat)) + <span class="number">1</span> / <span class="built_in">Math</span>.cos(<span class="keyword">this</span>.toRadians(lat))) / <span class="built_in">Math</span>.PI) / <span class="number">2</span> * (<span class="number">1</span> &lt;&lt; zoom)));</span><br><span class="line">        <span class="keyword">if</span> (xtile &lt; <span class="number">0</span>)</span><br><span class="line">            xtile = <span class="number">0</span>;</span><br><span class="line">        <span class="keyword">if</span> (xtile &gt;= (<span class="number">1</span> &lt;&lt; zoom))</span><br><span class="line">            xtile = ((<span class="number">1</span> &lt;&lt; zoom) - <span class="number">1</span>);</span><br><span class="line">        <span class="keyword">if</span> (ytile &lt; <span class="number">0</span>)</span><br><span class="line">            ytile = <span class="number">0</span>;</span><br><span class="line">        <span class="keyword">if</span> (ytile &gt;= (<span class="number">1</span> &lt;&lt; zoom))</span><br><span class="line">            ytile = ((<span class="number">1</span> &lt;&lt; zoom) - <span class="number">1</span>);</span><br><span class="line">        <span class="keyword">return</span> (zoom + <span class="string">"/"</span> + xtile + <span class="string">"/"</span> + ytile);</span><br><span class="line">    &#125;,</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 根据瓦片获取范围</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>x </span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>y </span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>zoom </span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    tile2boundingBox(x, y, zoom) &#123;</span><br><span class="line">        x = <span class="built_in">parseInt</span>(x);</span><br><span class="line">        y = <span class="built_in">parseInt</span>(y);</span><br><span class="line">        zoom = <span class="built_in">parseInt</span>(zoom);</span><br><span class="line">        <span class="keyword">let</span> bb = &#123;&#125;;</span><br><span class="line">        bb.ymax = <span class="keyword">this</span>.tile2lat(y, zoom);</span><br><span class="line">        bb.ymin = <span class="keyword">this</span>.tile2lat(y + <span class="number">1</span>, zoom);</span><br><span class="line">        bb.xmin = <span class="keyword">this</span>.tile2lon(x, zoom);</span><br><span class="line">        bb.xmax = <span class="keyword">this</span>.tile2lon(x + <span class="number">1</span>, zoom);</span><br><span class="line">        <span class="keyword">return</span> bb;</span><br><span class="line">    &#125;,</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 瓦片转换精度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>x </span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>z </span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    tile2lon(x, z) &#123;</span><br><span class="line">        <span class="keyword">return</span> x / <span class="built_in">Math</span>.pow(<span class="number">2.0</span>, z) * <span class="number">360.0</span> - <span class="number">180</span>;</span><br><span class="line">    &#125;,</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 瓦片转换纬度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>y </span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>z </span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    tile2lat(y, z) &#123;</span><br><span class="line">        <span class="keyword">let</span> n = <span class="built_in">Math</span>.PI - (<span class="number">2.0</span> * <span class="built_in">Math</span>.PI * y) / <span class="built_in">Math</span>.pow(<span class="number">2.0</span>, z);</span><br><span class="line">        <span class="keyword">return</span> <span class="keyword">this</span>.toDegrees(<span class="built_in">Math</span>.atan(<span class="built_in">Math</span>.sinh(n)));</span><br><span class="line"></span><br><span class="line">    &#125;,</span><br><span class="line">    toDegrees(angrad) &#123;</span><br><span class="line">        <span class="keyword">return</span> angrad * <span class="number">180.0</span> / <span class="built_in">Math</span>.PI;</span><br><span class="line">    &#125;,</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 转弧度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param <span class="type">&#123;*&#125;</span> </span>angdeg </span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    toRadians(angdeg) &#123;</span><br><span class="line">        <span class="keyword">return</span> angde / <span class="number">180</span> * <span class="built_in">Math</span>.PI;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p><strong>java</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">TileUtil</span> </span>&#123;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 根据经纬度和缩放等级，求得瓦片路径</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> lat 纬度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> lon 经度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> zoom 缩放级别</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> String <span class="title">getTileNumber</span><span class="params">(<span class="keyword">final</span> <span class="keyword">double</span> lat, <span class="keyword">final</span> <span class="keyword">double</span> lon, <span class="keyword">final</span> <span class="keyword">int</span> zoom)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">int</span> xtile = (<span class="keyword">int</span>)Math.floor( (lon + <span class="number">180</span>) / <span class="number">360</span> * (<span class="number">1</span>&lt;&lt;zoom) ) ;</span><br><span class="line">        <span class="keyword">int</span> ytile = (<span class="keyword">int</span>)Math.floor( (<span class="number">1</span> - Math.log(Math.tan(Math.toRadians(lat)) + <span class="number">1</span> / Math.cos(Math.toRadians(lat))) / Math.PI) / <span class="number">2</span> * (<span class="number">1</span>&lt;&lt;zoom) ) ;</span><br><span class="line">        <span class="keyword">if</span> (xtile &lt; <span class="number">0</span>)</span><br><span class="line">            xtile=<span class="number">0</span>;</span><br><span class="line">        <span class="keyword">if</span> (xtile &gt;= (<span class="number">1</span>&lt;&lt;zoom))</span><br><span class="line">            xtile=((<span class="number">1</span>&lt;&lt;zoom)-<span class="number">1</span>);</span><br><span class="line">        <span class="keyword">if</span> (ytile &lt; <span class="number">0</span>)</span><br><span class="line">            ytile=<span class="number">0</span>;</span><br><span class="line">        <span class="keyword">if</span> (ytile &gt;= (<span class="number">1</span>&lt;&lt;zoom))</span><br><span class="line">            ytile=((<span class="number">1</span>&lt;&lt;zoom)-<span class="number">1</span>);</span><br><span class="line">        <span class="keyword">return</span>(<span class="string">""</span> + zoom + <span class="string">"/"</span> + xtile + <span class="string">"/"</span> + ytile);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 根据瓦片获得范围</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> x 行</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> y 列</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> zoom 缩放级别（z）</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> TileBoxEntity <span class="title">tile2boundingBox</span><span class="params">(<span class="keyword">final</span> <span class="keyword">int</span> x, <span class="keyword">final</span> <span class="keyword">int</span> y, <span class="keyword">final</span> <span class="keyword">int</span> zoom)</span> </span>&#123;</span><br><span class="line">        TileBoxEntity bb=<span class="keyword">new</span> TileBoxEntity();</span><br><span class="line">        bb.setYmax(tile2lat(y, zoom));</span><br><span class="line">        bb.setYmin(tile2lat(y + <span class="number">1</span>, zoom));</span><br><span class="line">        bb.setXmin( tile2lon(x, zoom));</span><br><span class="line">        bb.setXmax(tile2lon(x + <span class="number">1</span>, zoom));</span><br><span class="line">        <span class="keyword">return</span> bb;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 瓦片转换经度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> x 行</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> z 列</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@return</span> 经纬度</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">double</span> <span class="title">tile2lon</span><span class="params">(<span class="keyword">int</span> x, <span class="keyword">int</span> z)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> x / Math.pow(<span class="number">2.0</span>, z) * <span class="number">360.0</span> - <span class="number">180</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     *瓦片转换纬度</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> y</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> z</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">double</span> <span class="title">tile2lat</span><span class="params">(<span class="keyword">int</span> y, <span class="keyword">int</span> z)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">double</span> n = Math.PI - (<span class="number">2.0</span> * Math.PI * y) / Math.pow(<span class="number">2.0</span>, z);</span><br><span class="line">        <span class="keyword">return</span> Math.toDegrees(Math.atan(Math.sinh(n)));</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">TileBoxEntity</span> </span>&#123;</span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">double</span> ymax;</span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">double</span> ymin;</span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">double</span> xmax;</span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">double</span> xmin;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">double</span> <span class="title">getYmax</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> ymax;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">setYmax</span><span class="params">(<span class="keyword">double</span> ymax)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">this</span>.ymax = ymax;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">double</span> <span class="title">getYmin</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> ymin;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">setYmin</span><span class="params">(<span class="keyword">double</span> ymin)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">this</span>.ymin = ymin;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">double</span> <span class="title">getXmax</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> xmax;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">setXmax</span><span class="params">(<span class="keyword">double</span> xmax)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">this</span>.xmax = xmax;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">double</span> <span class="title">getXmin</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> xmin;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">setXmin</span><span class="params">(<span class="keyword">double</span> xmin)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">this</span>.xmin = xmin;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> String <span class="title">toString</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="string">"["</span> + xmin + <span class="string">","</span> + ymin + <span class="string">","</span> + xmax + <span class="string">","</span> + ymax + <span class="string">"]"</span>;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>


        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2020-03-18T05:13:57.992Z" itemprop="dateUpdated">2020年3月18日 13:13</time>
</span><br>


        这里写留言或版权声明：<a href="/blog/2020/03/18/gis基本原理/瓦片计算工具类/" target="_blank" rel="external">http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/</a>
    </div>
    <footer>
        <a href="http://windynature.oschina.io">
            <img src="/blog/img/user2.jpg" alt="windy">
            windy
        </a>
    </footer>
</blockquote>

        


        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/gis/">gis</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/切片/">切片</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/&title=《切片请求工具类》 — 奔跑的蜗牛&pic=http://windynature.oschina.io/img/user2.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/&title=《切片请求工具类》 — 奔跑的蜗牛&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《切片请求工具类》 — 奔跑的蜗牛&url=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/&via=http://windynature.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/blog/2020/03/18/openlayers/openlayers学习笔记/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">openlayers 学习笔记</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/blog/2020/03/18/mapbox/mapbox源码分析/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">mapbox源码分析（一）</h4>
      </a>
    </div>
  
</nav>



    

<div class="comments" id="comments">
    <div class="ds-thread" data-thread-key="gis基本原理/瓦片计算工具类" data-title="切片请求工具类" data-url="http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/"></div>
</div>
<script>
lazyScripts.push('//cdn.bootcss.com/marked/0.3.6/marked.min.js');

var duoshuoQuery = {short_name:'ysblog', theme: 'none'};
lazyScripts.push('//unpkg.com/hexo-theme-material-indigo@1.5.2/js/embed.min.js');


</script>










</article>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            <span>博客内容遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a></span>
            <span>奔跑的蜗牛 &copy; 2015 - 2020</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/&title=《切片请求工具类》 — 奔跑的蜗牛&pic=http://windynature.oschina.io/img/user2.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/&title=《切片请求工具类》 — 奔跑的蜗牛&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《切片请求工具类》 — 奔跑的蜗牛&url=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/&via=http://windynature.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://windynature.oschina.io/2020/03/18/gis基本原理/瓦片计算工具类/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/blog/', SHARE: true, REWARD: false };



</script>

<script src="//unpkg.com/hexo-theme-material-indigo@1.5.2/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@1.5.2/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
